<?php

/*

    MMetaverse - Open Metaverse Access Library

    Copyright (c) 2009 Mary Jane Soft - Marlon J. Manrique

    http://www.maryjanesoft.com
    http://www.marlonj.com

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General
    Public License along with this library; if not, write to the
    Free Software Foundation, Inc., 59 Temple Place, Suite 330,
    Boston, MA  02111-1307  USA

    $Id$

*/

/**
 * @package mjs.mmetaverse.manager
 */

/**
 * Asset
 */
class MAsset {

    /**
     * Aseet Type Unknown
     * @var integer
     */
    const TYPE_UNKNOWN = -1;

    /**
     * Aseet Type Texture
     * @var integer
     */
    const TYPE_TEXTURE = 0;

    /**
     * Aseet Type Sound
     * @var integer
     */
    const TYPE_SOUND = 1;

    /**
     * Aseet Type Calling Card
     * @var integer
     */
    const TYPE_CALLING_CARD = 2;

    /**
     * Aseet Type Landmark
     * @var integer
     */
    const TYPE_LANDMARK = 3;

    /**
     * Aseet Type Clothing
     * @var integer
     */
    const TYPE_CLOTHING = 5;

    /**
     * Aseet Type Object
     * @var integer
     */
    const TYPE_OBJECT = 6;

    /**
     * Aseet Note Card
     * @var integer
     */
    const TYPE_NOTECARD = 7;

    /**
     * Aseet Folder
     * @var integer
     */
    const TYPE_FOLDER = 8;

    /**
     * Aseet Root Folder
     * @var integer
     */
    const TYPE_FOLDER_ROOT = 9;

    /**
     * Aseet LSL Text
     * @var integer
     */
    const TYPE_LSL_TEXT = 10;

    /**
     * Aseet LSL Bytecode
     * @var integer
     */
    const TYPE_LSL_BYTECODE = 11;

    /**
     * Aseet Texture TGA
     * @var integer
     */
    const TYPE_TEXTURE_TGA = 12;

    /**
     * Aseet Body Part
     * @var integer
     */
    const TYPE_BODYPART = 13;

    /**
     * Aseet Trash Folder
     * @var integer
     */
    const TYPE_FOLDER_TRASH = 14;

    /**
     * Aseet Snapshot Folder
     * @var integer
     */
    const TYPE_FOLDER_SNAPSHOT = 15;

    /**
     * Aseet Lost and Found Folder
     * @var integer
     */
    const TYPE_FOLDER_LOST_AND_FOUND = 16;

    /**
     * Aseet Sound Wav
     * @var integer
     */
    const TYPE_SOUND_WAV = 17;

    /**
     * Aseet Image TGA
     * @var integer
     */
    const TYPE_IMAGE_TGA = 18;

    /**
     * Aseet Image JPEG
     * @var integer
     */
    const TYPE_IMAGE_JPEG = 19;

    /**
     * Aseet Animation
     * @var integer
     */
    const TYPE_ANIMATION = 20;

    /**
     * Aseet Gesture
     * @var integer
     */
    const TYPE_GESTURE = 21;

    /**
     * Aseet Sim State File
     * @var integer
     */
    const TYPE_SIM_STATE = 22;

    /**
     * UUID
     * 
     * @var MUUID
     */
    private $uuid;

    /**
     * Asset Name
     *
     * @var string
     */
    private $name;

    /**
     * Description
     *
     * @var string
     */
    private $description;

    /**
     * Type
     *
     * @var integer
     */
    private $type;

    /**
     * Binary data
     *
     * @var string
     */
    private $data;

    /**
     * Create a new asset with the specified information
     *
     * @param MUUID $uuid
     * @param string $name
     * @param string $description
     * @param integer $type
     * @param string $data
     */
    public function __construct(MUUID $uuid, $name, $description, 
        $type, $data) {
        $this->uuid = $uuid;
        $this->name = $name;
        $this->description = $description;
        $this->type = $type;
        $this->data = $data;
    }

    /**
     * Returns the uuid
     * @return MUUID
     */
    public function getUUID() {
        return $this->uuid;
    }

    /**
     * Return the asset name
     * @return string
     */
    public function getName() {
        return $this->name;
    }

    /**
     * Returns the asset description
     * @return string
     */
    public function getDescription() {
        return $this->description;
    }

    /**
     * Returns the asset type 
     * @return integer
     */
    public function getType() {
        return $this->type;
    }

    /**
     * Returns the asset data
     * @return string
     */
    public function getData() {
        return $this->data;
    }
}

?>